//
//  WH_LuckCell.m
//  App_6.23
//
//  Created by wanghao on 16/7/20.
//  Copyright © 2016年 wanghao. All rights reserved.
//

#import "WH_LuckCell.h"

#import "WH_Home.h"

@interface WH_LuckCell ()

@property (weak, nonatomic) IBOutlet UIImageView *nameImage;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *periodL;

@property (weak, nonatomic) IBOutlet UILabel *countL;
@property (weak, nonatomic) IBOutlet UILabel *timeL;
@property (weak, nonatomic) IBOutlet UILabel *winL;
@property (weak, nonatomic) IBOutlet UILabel *orderIDL;

@end
@implementation WH_LuckCell

-(void)setLuckOrder:(WH_Home *)luckOrder{
    
    if (_luckOrder != luckOrder) {
        
        _luckOrder = luckOrder;
    }
    [self.nameImage sd_setImageWithURL:[NSURL URLWithString:_luckOrder.product_image] placeholderImage:PLACEHOLDER_CELL_SAME];
    self.nameLabel.text = _luckOrder.product_name;
    self.periodL.text = [NSString stringWithFormat:@"参与期号:  %@",_luckOrder.product_period_no];
    self.countL.text = [NSString stringWithFormat:@"我已参与:  %@人次",_luckOrder.order_num];
    [WH_AppTools changeColor:self.countL.text color:[UIColor redColor] xx:_luckOrder.order_num nn:self.countL];
    self.timeL.text = [NSString stringWithFormat:@"夺宝时间:  %@",_luckOrder.order_time];
    self.winL.text = [NSString stringWithFormat:@"本期幸运号码:  %@",_luckOrder.win_num];
    [WH_AppTools changeColor:self.winL.text color:[UIColor redColor] xx:_luckOrder.win_num nn:self.winL];
    self.orderIDL.text = [NSString stringWithFormat:@"总需人次:  %@",_luckOrder.product_total];
    
}
- (IBAction)shareTomessage:(UIButton *)sender {
    
    [self.delegate pushToperoid:_luckOrder];
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
